Skip to content

feature: Create LambdaProxyEvent Type #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 1, 2022

Conversation

idelfonsog2
Copy link
Contributor

Create LambdaProxyEvent

previous PR with original template #16

Motivation:

I was getting Decoding errors when invoking my lambda using APIGateway Event Request. I looked at the AWS Documentation and Serverless documentation and notice a different object from what is currently in the package

Modifications:

Edit a couple of the properties in the APIGatewayV2Request

Result:

My lambda is able to receive the Event from APIGateway along with the body I included in my http request

@swift-server-bot
Copy link

Can one of the admins verify this patch?

5 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@idelfonsog2 idelfonsog2 force-pushed the feature/lambda-proxy-event-type branch from 62da079 to fa43957 Compare April 27, 2022 22:52
@idelfonsog2 idelfonsog2 force-pushed the feature/lambda-proxy-event-type branch from fa43957 to 4690233 Compare April 27, 2022 22:54
Copy link
Member

@fabianfett fabianfett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into this! This is a great start. Some comments...

idelfonsog2 and others added 9 commits April 28, 2022 06:42
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
//
//===----------------------------------------------------------------------===//

public struct LambdaProxyEvent: Codable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are only ever decoding these events, is Decodable conformance enough?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iiuc this is specifically for an APIGateway proxy? If so, should we use a less generic name than LambdaProxyEvent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I would agree with keeping the type only to the Decodable

  2. The name was suggested by Fabian, how about 'LambdaGatewayProxyEvent' ? Trying to keep the length to a minimum also

@tomerd
Copy link
Contributor

tomerd commented Apr 28, 2022

@swift-server-bot test this please

@tomerd
Copy link
Contributor

tomerd commented Apr 28, 2022

thanks for the PR @idelfonsog2, looks great! some small questions

chore: make Type only Decoable
chore: run soundness.sh
@idelfonsog2
Copy link
Contributor Author

@swift-server-bot test this please

1 similar comment
@tomerd
Copy link
Contributor

tomerd commented Apr 28, 2022

@swift-server-bot test this please

@tomerd
Copy link
Contributor

tomerd commented Apr 28, 2022

lgtm, lets also see what @fabianfett thinks

@tomerd
Copy link
Contributor

tomerd commented May 10, 2022

@fabianfett ?

@tomerd tomerd merged commit a8c815e into swift-server:main Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants